package MapReduce.outPutFormat;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class LogOutputReducer extends Reducer<Text, NullWritable,Text,NullWritable> {
    @Override
    protected void reduce(Text key, Iterable<NullWritable> values, Reducer<Text, NullWritable, Text, NullWritable>.Context context) throws IOException, InterruptedException {

        // 数据格式：
        // http://www.baidu.com
        // http://www.google.com
        // 防止两条数据一样的情况，
        for (NullWritable value : values) {
            context.write(key,NullWritable.get());
        }
    }
}
